<p id="notice"><%= notice %></p>

<h1>Knowledges</h1>

<%= form_tag url_for([@project, :knowledges]), method: :get do %>
   <%= text_field_tag :keywords %>
   <%= submit_tag 'Search' %>
<% end %>

<table>
  <thead>
    <tr>
      <th>Project</th>
      <th>Phrase</th>
      <th>Meaning</th>
      <th colspan="3"></th>
    </tr>
  </thead>

  <tbody>
    <% @knowledges.each do |knowledge| %>
      <tr>
        <td><%= knowledge.project.name %></td>
        <td><%= knowledge.phrase %></td>
        <td><%= knowledge.meaning %></td>
        <td><%= link_to 'Show', knowledge %></td>
        <td><%= link_to 'Edit', [:edit, knowledge] %></td>
        <td><%= link_to 'Destroy', knowledge, method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to 'New Knowledge', new_project_knowledge_path(@project) %>
